package com.cn.wanxi.tread;

public class TestRunnable {
    //   1.定义一个类MyRunnable，实现Runnable接口
//2.重写Runnable里面的run方法
//3.将具体方法写入run方法里面
//4.创建一个执行MyRunnable的类TestRunnable
//5.创建一个MyRunnable对象
//6.创建一个Thread对象，并将MyRunnable对象当中参数传入
//7.开启线程
    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(new MyRunnable(), "dfas");
        thread.setName("aa");
        thread.start();
    }
}
